//
//  PrefixHeader.h
//  FM
//
//  Created by 王方伟 on 2017/11/23.
//  Copyright © 2017年 wfw. All rights reserved.
//

#ifndef PrefixHeader_h
#define PrefixHeader_h


#define kBaseUrl @"http://mobile.ximalaya.com/"

//屏幕宽度
#define SHScreenW [UIScreen mainScreen].bounds.size.width
//屏幕高度
#define SHScreenH [UIScreen mainScreen].bounds.size.height

//iPhoneX底部安全区域
#define isIPhoneX     ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(1125, 2436), [[UIScreen mainScreen] currentMode].size) : NO)
#define SafeAreaBottomHeight (isIPhoneX ? 34 : 0)
#define SafeAreaTopHeight (isIPhoneX ? 88 : 64)

#define SHPhone6W 375.0
#define SHPhone6H 667.0

#define SHScaleX SHScreenW / SHPhone6W
#define SHScaleY SHScreenH / SHPhone6H

#define LineX(l) l*SHScaleX
#define LineY(l) l*SHScaleY

#define Font(x) [UIFont systemFontOfSize:x*SHScaleX]

//获得RGB颜色
#define SHColor(r, g, b) [UIColor colorWithRed:(r)/255.0 green:(g)/255.0 blue:(b)/255.0 alpha:1.0]
#define SHColorA(r, g, b, a) [UIColor colorWithRed:(r)/255.0 green:(g)/255.0 blue:(b)/255.0 alpha:a]

//自定义Log
#ifdef DEBUG
#define SHLog(...) NSLog(__VA_ARGS__)
#else
#define SHLog(...)
#endif

#endif /* PrefixHeader_h */
